package com.useeinfo.oa.common.validator;

import com.useeinfo.oa.common.exception.MyException;
import org.apache.commons.lang.StringUtils;

/**
 * 数据校验
 *
 * @author GeniusJ
 * @email 975473185@qq.com
 * @date 2017-11-17
 * @time 16:46
 */
public abstract  class Assert {
    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new MyException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new MyException(message);
        }
    }
}
